<template>
	<view>
		
		<view class="aboutBox">
			<view class="aboutItem" @click="toSystem(1)">
				用户协议
				<view class="aboutIcon">
					<u-icon name="arrow-right" size="28" ></u-icon>
				</view>
				
			</view>
			<view class="aboutItem" @click="toSystem(2)">
				隐私协议
				<view class="aboutIcon">
					<u-icon name="arrow-right" size="28" ></u-icon>
				</view>
				
			</view>
			<view class="aboutItem" @click="goPage('/pagesOther/user/userAbout')">
				关于我们
				<view class="aboutIcon">
					<u-icon name="arrow-right" size="28" ></u-icon>
				</view>
			</view>
			<view class="aboutItem" @click="goPage('/pages/message/webHome')">
				分享朋友圈
				<view class="aboutIcon">
					<u-icon name="arrow-right" size="28" ></u-icon>
				</view>
			</view>
			<!-- #ifdef APP-PLUS -->
			
			<!-- #endif -->
			<view class="aboutItem" @click="noticeAsk">
				帐号注销
				<view class="aboutIcon">
					<u-icon name="arrow-right" size="28" ></u-icon>
				</view>
			</view>
		</view>
		
		<view class="loginOut" @click="loginOut">
			退出登陆
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				agreementDetail: {},
			}
		},
		onLoad(option) {
			// uni.showLoading({
			// 	title: '加载中'
			// });
			;
		},
		onShow: function() {
			
		},
		onReady() {
			
		},
		methods: {
			
			noticeAsk(){
				var _this=this;
				uni.showModal({
					title:'提示',
					content:'您确定要注销您的帐号信息吗？删除后数据将无法恢复',
					success(){
						uni.showToast({
							title:'操作成功'
						})
						_this.loginOut();
					}
				})
			},
			loginOut(){
				// 缓存token
				uni.setStorageSync('token', '');
				// 缓存用户信息
				uni.setStorageSync('userInfo', '');
				console.log('wx=============================4')
				uni.redirectTo({
					url:'/pages/login/loginWx'
				})
			},
			
			
			// 页面跳转
			goPage(url) {
				uni.navigateTo({
					url: url
				})
			},
			// 获取关于我们
			toSystem(idData){
				uni.navigateTo({
					url:'/pagesOther/user/articleDetail?id='+idData
				})
			}
		}
	}
</script>

<style scoped>
	.agreementDetail_box {
		padding: 30rpx 20rpx;
		background-color: #fff;
		overflow: hidden;
		
	}

	.tit {
		font-size: 32rpx;
		font-weight: bold;
		color: #333;
		text-align: left;
	}

	.date {
		font-size: 24rpx;
		color: #666;
		text-align: left;
		margin: 20rpx 0;
	}

	.content {
		
		width: 100%;
		overflow: hidden;
	}
	.content image{
		max-width: 100%;
	}
	.aboutBox{
		background-color: #fff;
		
	}
	.aboutItem{
		padding: 0 20rpx;
		border-bottom: 2rpx solid #eee;
		height: 100rpx;
		line-height: 100rpx;
		
	}
	.aboutItem .aboutIcon{
		float: right;
	}
	
	.loginOut{
		width: 690rpx;
		height: 90rpx;
		border-radius: 10rpx;
		background-color: #327FE8;
		margin: 20rpx auto;
		text-align: center;
		color: #fff;
		line-height: 90rpx;
	}
</style>
